package reflect;

//单例
class Hero{
	
	String name;
	int age;
	
	private static Hero obj=new Hero();
	
	private Hero(){
		
	}
	
	public static  Hero getInstance(){
		return obj;
	}
	
	
}

public class Test6 {

	public static void main(String[] args) {
		
		Hero temo=Hero.getInstance();
		 

	}

}
